package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.atguigu.springcloud.entity.CommonResult;
import com.atguigu.springcloud.service.impl.TestServiceImpl;

import cn.hutool.core.date.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@Api("TestController")
@RequestMapping(value = "/t")
public class TestController {
	@Autowired
	TestServiceImpl testServiceImpl;
	
	@ApiOperation("测试")
	@GetMapping(value = "/test1")
	public CommonResult test1() {
		String test1 = testServiceImpl.test1();
		System.out.println(test1);
		return CommonResult.ok(test1);

	}
	
	@ApiOperation("测试")
	@GetMapping(value = "/test2")
	public CommonResult test2() {
		String test1 = testServiceImpl.test2();
		System.out.println(test1);
		return CommonResult.ok(test1);
	}
}
